package cn.hk.vaccination.mapper;

import cn.hk.vaccination.domain.DeptVaccinesStock;
import cn.hk.vaccination.domain.vo.VaccinationVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 社区对应的疫苗库存 Mapper 接口
 * </p>
 *
 * @author xu
 * @since 2023-03-10
 */
@DataSource(value = DataSourceType.KELIN)
public interface DeptVaccinesStockMapper extends BaseMapper<DeptVaccinesStock> {

    List<Integer> selectDeptVaccineIdsByDeptId(@Param("deptId") Long deptId);

    Integer selectAdequateByVidAndDeptid(@Param("vid") Long vaccinesId,@Param("deptId") Long deptId);

    DeptVaccinesStock selectOneByDeptIdAndVid(@Param("deptId") Long deptId,@Param("vid") Long vid);

    List<DeptVaccinesStock> selectListByDeptIdAndVidList(@Param("deptId")Long deptId,@Param("vidList") List<Long> vidList);

    List<VaccinationVo> selectListByDeptId(@Param("deptId")Long deptId);
}
